<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('scenic_spots', function (Blueprint $table) {
            \Illuminate\Support\Facades\DB::statement("ALTER TABLE dove_scenic_spots
MODIFY COLUMN traffic varchar(2024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '交通信息' AFTER location;");
            \Illuminate\Support\Facades\DB::statement("ALTER TABLE dove_scenic_spots
MODIFY COLUMN introduction text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '景区描述' AFTER traffic;");
            \Illuminate\Support\Facades\DB::statement("ALTER TABLE dove_scenic_spots
MODIFY COLUMN sentence varchar(2024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '一句话描述' AFTER open_hours;");
            \Illuminate\Support\Facades\DB::statement("ALTER TABLE dove_scenic_spots
MODIFY COLUMN open_hours varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '景区营业时间' AFTER open_type;");
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('dove_scenic_spots', function (Blueprint $table) {
        });
    }
};
